import React, { Component } from 'react'
import { Input, Icon } from 'antd'
import ImageModal from '../images/ImageModal'

export default class extends Component {
    constructor(props) {
        super(props)
        this.state = {
            modalVisible: false
        }
    }
    openModal = () => {
        this.setState({
            modalVisible: true
        })
    }
    closeModal = () => {
        this.setState({
            modalVisible: false
        })
    }

    onModalOpen = () => {
        this.openModal()
    }
    onModalClose = () => {
        this.closeModal()
    }
    onModalSave = () => {

    }
    render() {
        return (
            <div>
                <Input value="" onChange={this.triggerChange}  readOnly suffix={<div style={{cursor: 'pointer'}}>
                    <Icon type="close" onClick={() => {
                    }}/>
                    <Icon style={{marginLeft: '10px', marginRight: '5px'}}　type="upload"  onClick={this.onModalOpen} />
                </div>} />
                <ImageModal visible={this.state.modalVisible} onCancel={this.onModalClose} onOk={this.onModalSave}/>
            </div>
        )
    }
}
